/* 自定义样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 游戏样式 */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-info {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.game-canvas {
    border: 2px solid #333;
    border-radius: 8px;
    background: #f0f0f0;
}

.game-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

/* 记忆翻牌游戏样式 */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.memory-card {
    width: 80px;
    height: 80px;
    background: #007bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.memory-card.flipped {
    background: #28a745;
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: #ffc107;
    cursor: default;
}

/* 打地鼠游戏样式 */
.whack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.whack-hole {
    width: 80px;
    height: 80px;
    background: #8b4513;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.whack-mole {
    width: 60px;
    height: 60px;
    background: #654321;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
}

.whack-mole.active {
    background: #8b4513;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-canvas {
        width: 300px;
        height: 300px;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .memory-card {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* 动画效果 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* 排行榜样式 */
.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.leaderboard-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.leaderboard-rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: #007bff;
}

.leaderboard-name {
    flex: 1;
    margin-left: 15px;
    font-weight: 500;
}

.leaderboard-score {
    font-weight: bold;
    color: #28a745;
}
